1. Field of the Invention
The present invention relates generally to flow control, and more particularly, to controlling the rate of data flow.
2. Description of Related Art
A router receives data on a physical media, such as optical fiber, analyzes the data to determine its destination, and outputs the data on a physical media in accordance with the destination. A router typically includes buffers that temporarily store the data during the above-described processing. In those situations when data is transferred to these buffers at a rate that exceeds the rate at which the data is read from the buffers, the buffers may experience an overflow condition. When an overflow condition occurs, the buffers may transmit a flow control signal to the device from which data is transferred in order to suspend the transfer of data until the overflow condition has been eliminated.
If the delay associated with the flow control signal is large, the device that is transmitting the data may continue transmitting to transfer data to the overflowed buffer until the flow control signal is received. The buffers may discard the data received after the flow control signal has been transmitted, resulting in possibly a large amount of data being discarded.
Another alternative is to initiate flow control well before the buffer is full, so that all in-flight data within the flow control latency can be absorbed. However, this approach increases the size of the buffer, which in some cases can be too large to fit on a physical chip.
It is, therefore, desirable to improve the flow control latency in a network device. However, latency can be reduced only up to a point, especially when the network device is partitioned over multiple physical chips. Hence, a better flow control approach is needed.